﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Sisocana.Core.Models
{
    public class SearchPersonViewModel
    {
        public SearchPersonViewModel()
        {
           /*ToDateMissing = DateTime.Now.Date;        
           FromDateMissing = DateTime.Now.AddYears(-1).Date;*/
        }

        public bool IsAdvanced { get; set; }

        [DisplayName("Keyword")]
        [StringLength(100, MinimumLength = 3, ErrorMessage = "The minimum length is 3 and the maximum length is 100")]
        public string Keyword { get; set; }

        [DisplayName("First Name")]
        [StringLength(100, MinimumLength = 3, ErrorMessage = "The minimum length is 3 and the maximum length is 100")]
        public string FirstName { get; set; }

        [DisplayName("Last Name")]
        [StringLength(100, MinimumLength = 3, ErrorMessage = "The minimum length is 3 and the maximum length is 100")]
        public string LastName { get; set; }
        public string Phone { get; set; }

        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
        public DateTime FromDateMissing { get; set; }

        [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
        [DataType(DataType.Date)]
        public DateTime ToDateMissing { get; set; }

        [UIHint("_FullMissingPersonList")]
        public IList<PersonaDesaparecidaFullModel> results { get; set; }
    }
}
